﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nodeApp
{
    public class Edge
    {
        public int weight;
        public Node startNode;
        public Node endNode;

        public Edge(int edgeWeight,Node startNode, Node endNode)
        {
            weight = edgeWeight;
            this.startNode = startNode;
            this.endNode = endNode;
        }

        public bool Contains(Node searchNode)
        {
            return (this.startNode.Equals(searchNode) || this.endNode.Equals(searchNode));
        }
    }
}

